<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vibrator</title>
    <link rel="stylesheet" href="../../model/jsFn.css">
    <link rel="stylesheet" href="../../model/element.css">
</head>
<body>

<div class="catalog">
    <h1>目录</h1>
    <ul>
        <li>
            <p><a href="#profile">Vibrator</a></p>
            <ul>
                <li><p><a href="#jsFn_Vibrator">vibrator(array,int) ----------开始震动</a></p></li>
                <li><p><a href="#jsFn_Vibrator-int">vibrator(int) ----------开始震动</a></p></li>
                <li><p><a href="#jsFn_cancel">cancel() ----------清除震动</a></p></li>
                <li><p><a href="#jsFn_hasVibrator">hasVibrator() ----------是否支持震动</a></p></li>
            </ul>
        </li>
    </ul>
</div>

<div id="apicontent">
    <div id="profile">
        <h2>对象简介:</h2>
        <p>Vibrator 对象提供了app震动的函数;</p>
    </div>


    <div class="jsFnModel" id="jsFn_Vibrator">
        <h3>Vibrator.vibrator()</h3>
        <div class="shape">
            <h3>函数使用样式</h3>
            <p>Vibrator.vibrator(pattern,repeat) -> null</p>
        </div>
        <div class="profile">
            <h3>函数功能简介</h3>
            <p>Vibrator.vibrator([1000,10000,1000,10000],-1);方法会让app 震动, 参数1，是 暂停一秒  ，震动10秒，暂停一秒，震动10秒 ; 参数2：让app从规定-1不重复，非-1为从pattern的指定下标开始重复</p>
        </div>
        <div class="version">
            <p>稳定性;2 - 稳定的</p>
            <p>新增于:v0.0.0</p>
        </div>
        <div class="params">
            <h3>参数列表:</h3>
            <ul>
                <li>
                    <p>pattern</p>
                    <p>&nbsp;array&nbsp;</p>
                    <p>震动周期</p>
                </li>
                <li>
                    <p>repeat</p>
                    <p>&nbsp;int&nbsp;</p>
                    <p>-1不重复，非-1为从pattern的指定下标开始重复</p>
                </li>
            </ul>
        </div>
        <div class="res">
            <h3>返回值:</h3>
            <p>null</p>
        </div>
        <div class="code">
            <h3>例子</h3>
            <pre>
            <code>
                 Vibrator.vibrator([1000,10000,1000,10000],-1)；
                手机暂停一秒  ，震动10秒，暂停一秒，震动10秒
            </code>
        </pre>
        </div>
        <div class="error">
            <h3>抛出错误</h3>
        </div>
    </div>


    <div class="jsFnModel" id="jsFn_Vibrator-int">
        <h3>Vibrator.vibrator()</h3>
        <div class="shape">
            <h3>函数使用样式</h3>
            <p>Vibrator.vibrator(time) -> null</p>
        </div>
        <div class="profile">
            <h3>函数功能简介</h3>
            <p>手机震动指定时长</p>
        </div>
        <div class="version">
            <p>稳定性;2 - 稳定的</p>
            <p>新增于:v0.0.1</p>
        </div>
        <div class="params">
            <h3>参数列表:</h3>
            <ul>
                <li>
                    <p>time</p>
                    <p>&nbsp;int&nbsp;</p>
                    <p>震动时长</p>
                </li>
            </ul>
        </div>
        <div class="res">
            <h3>返回值:</h3>
            <p>null</p>
        </div>
        <div class="code">
            <h3>例子</h3>
            <pre>
            <code>
                //手机震动2秒
                Vibrator.vibrator(2000)；
            </code>
        </pre>
        </div>
        <div class="error">
            <h3>抛出错误</h3>
        </div>
    </div>


    <div class="jsFnModel" id="jsFn_cancel">
        <h3>Vibrator.cancel()</h3>
        <div class="shape">
            <h3>函数使用样式</h3>
            <p>Vibrator.cancel();</p>
        </div>
        <div class="profile">
            <h3>函数功能简介</h3>
            <p>Vibrator.cancel();方法会让app 停止震动</p>
        </div>
        <div class="version">
            <p>稳定性;2 - 稳定的</p>
            <p>新增于:v0.0.0</p>
        </div>
        <div class="params">
            <h3>参数列表:</h3>
            <ul>
                <li>
                    <p>无</p>
                </li>

            </ul>
        </div>
        <div class="res">
            <h3>返回值:</h3>
            <p>null</p>
        </div>
        <div class="code">
            <h3>例子</h3>
            <pre>
            <code>
            Vibrator.cancel()；
                手机停止震动；
            </code>
        </pre>
        </div>
        <div class="error">
            <h3>抛出错误</h3>
        </div>
    </div>

    <div class="jsFnModel" id="jsFn_hasVibrator">
        <h3>Vibrator.hasVibrator()</h3>
        <div class="shape">
            <h3>函数使用样式</h3>
            <p>Vibrator.hasVibrator() -> boolean;</p>
        </div>
        <div class="profile">
            <h3>函数功能简介</h3>
            <p>Vibrator.hasVibrator();设备是否支持震动</p>
        </div>
        <div class="version">
            <p>稳定性;2 - 稳定的</p>
            <p>新增于:v0.0.1</p>
        </div>
        <div class="params">
            <h3>参数列表:</h3>
            <ul>
                <li>
                    <p>无</p>
                </li>
            </ul>
        </div>
        <div class="res">
            <h3>返回值:</h3>
            <p>boolean</p>
            <p>设备是否支持震动,true:支持;false:不支持</p>
        </div>
        <div class="code">
            <h3>例子</h3>
            <pre>
            <code>
                //设备是否支持震动
                let canVibrator = Vibrator.hasVibrator()；
            </code>
        </pre>
        </div>
        <div class="error">
            <h3>抛出错误</h3>
        </div>
    </div>
    <div style="height: 5000px"></div>
</div>
</body>
</html>